//
//  WJCSiftModel.m
//  辅城
//
//  Created by WJC on 2017/3/6.
//  Copyright © 2017年 吴 剑川. All rights reserved.
//

#import "WJCSiftModel.h"

@implementation WJCSiftModel

/* 抽出底层数据转其它key */
+ (NSDictionary *)mj_replacedKeyFromPropertyName
{
    return @{
        @"Id":@"id",
        @"Name":@"name",
             };
}
+ (NSDictionary *)mj_objectClassInArray
{
    return @{@"subArr" : @"WJCSiftModel"};
    
}
-(void)setValuesForKeysWithDictionary:(NSDictionary<NSString *,id> *)keyedValues{
    
        for (NSString* key in keyedValues) {
            @try {
            if ([key isEqualToString:@"Id"]) {
                self.Id=keyedValues[key];
//                [self.Id setValuesForKeysWithDictionary:keyedValues[key]];
                continue;
            }
            if ([key isEqualToString:@"Name"]) {
                self.Name=keyedValues[key];
//                [self.Name setValuesForKeysWithDictionary:keyedValues[key]];
                continue;
            }
            else continue;
        }
            @catch (NSException *exception) {
            }
    }
}

-(id)copyWithZone:(NSZone *)zone{
    
    WJCSiftModel *instance = [[WJCSiftModel alloc] init];
    if (instance) {
        instance.Id = [self.Id copyWithZone:zone];
        instance.Name = [self.Name copyWithZone:zone];
        instance.mode = [self.mode copyWithZone:zone];
        instance.Icon = [self.Icon copyWithZone:zone];
        instance.Ordering = [self.Ordering copyWithZone:zone];
        instance.PublishTime = [self.PublishTime copyWithZone:zone];
        instance.color = [self.color copyWithZone:zone];
        instance.others = [self.others copyWithZone:zone];
    }
    return instance;
    
}

-(id)mutableCopyWithZone:(NSZone *)zone{
    
    WJCSiftModel *instance = [[WJCSiftModel alloc] init];
    if (instance) {
        instance.Id = [self.Id copyWithZone:zone];
        instance.Name = [self.Name copyWithZone:zone];
        instance.mode = [self.mode copyWithZone:zone];
        instance.Icon = [self.Icon copyWithZone:zone];
        instance.Ordering = [self.Ordering copyWithZone:zone];
        instance.PublishTime = [self.PublishTime copyWithZone:zone];
        instance.color = [self.color copyWithZone:zone];
        instance.others = [self.others copyWithZone:zone];
    }
    return instance;
    
}

+(WJCSiftModel*)setModel:(NSString*)name :(NSString*)Id :(cellItemType)type{
    WJCSiftModel *sift = [WJCSiftModel new];
    sift.Name = name;
    sift.Id = Id;
    sift.itemType = type;
    return sift;
}
-(NSString *)description{
    return [NSString stringWithFormat:@"id=%@///name=%@///type=%@",self.Id,self.Name,self.mode];
}
@end
